/*
 * client.h
 *
 *  Created on: 20-12-2010
 *      Author: marseel
 */

#ifndef CLIENT_H_
#define CLIENT_H_

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>

#include <arpa/inet.h>

#include <sstream>
#include <string>

#define MAXDATASIZE 102400

using namespace std;

class client {
public:
	client();
	virtual ~client();
	string Recv();
	void setIP(string ip);
	void setPort(int p);
private:
    int sockfd, numbytes;
    char buf[MAXDATASIZE];
    struct addrinfo hints, *servinfo, *p;
    int rv;
    char s[INET6_ADDRSTRLEN];
    string IP;
    string PORT;
};

#endif /* CLIENT_H_ */
